$(document).ready(function(){
	$('#list_anchor').click(function(){
    setListname($('#listname').val());
	});	
});

function setListname(str) {
  var returnVal = null;
  $.ajax({
    async: false,
		type: "POST",
		url: "postlistname.php",
		dataType: "json",
		data: { sendToValue: str }
	});
}